﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace VehicleManagement.Models
{
    public class Apply
    {
        //   -------申请表-------
        //create table ApplyInfo
        //(
        //ApplyID int  IDENTITY(1,1) primary key,
        //ApplicantID int not null,
        //Apply_time datetime default(getdate()),
        //Car_type varchar(18) not null,
        //Car_use varchar(100) not null,
        //Remark  varchar(100),
        //foreign key (ApplicantID) references ApplicantInfo(ApplicantID)
        //)

        public int ApplyID { get; set; }
        public int ApplicantID { get; set; }

        [DisplayName("申请人姓名")]
        public virtual string ApplicantName { get; set; }

        [DisplayName("车辆类型")]
        [Required(ErrorMessage = "车辆类型不能为空")]
        [StringLength(18, ErrorMessage = "姓名长度不能超过18位")]
        public string CarType { get; set; }

        [DisplayName("申请时间")]
        public DateTime ApplyTime { get; set; }

        [DisplayName("申请用途")]
        [Required(ErrorMessage = "申请用途不能为空")]
        [StringLength(100, ErrorMessage = "申请用途不能超过100位")]
        public string CarUse { get; set; }

        [DisplayName("备注")]
        [StringLength(100, ErrorMessage = "备注长度不能超过100位")]
        public string Remark { get; set; }

        [DisplayName("申请状态")]
        public virtual bool ApplyState { get; set; }

    }
}